package com.shi.study.lanmda;

import java.util.stream.Stream;

public class aaa {

    public static  void main(String[] args){
        String str="good morning shichangzhi";
        Stream.of(str.split(" ")).map(s->s.length()).forEach(System.out::println);
        Stream.of(str.split(" ")).filter(s -> s.length()>4).map(s->s.length()).forEach(System.out::println);
        Stream.of(str.split(" ")).mapToInt(s->s.length()).forEach(System.out::println);
        Stream.of(str.split(" ")).peek(System.out::println);

        new Thread(()->{
            System.out.println();
        });
    }

}